<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>提现-金酒币</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<include file="public/comm" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav white hx_1 fs_xl">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left fs_xxi"></a>
			<h1 class="mui-title fs_xl">提现-金酒币</h1>
		</header>
		<include file="public/bottom_nav" />
		<div class="mui-content fs_xl">
			<div class="tx_top cls">
				<ul>
					<li style="width:100%;padding-left: 0.6em; color: #ef4021;">提现到余额</li>
					<!--<li>到微信</li>
					<li>到银行卡</li>-->
				</ul>
			</div>
			<div class="tx_box">
				<div class="tx_mm active">
					<form id="yetx">
						<div class="tx_input mui-input-row fs_xl cls">
							<label class="fs_xl">金额</label>
							<input class="mui-input-clear" type="text" name="money" id="" placeholder="本次最多转出￥{$user.pay_gold_TX}" onkeyup="(this.v=function(){this.value=this.value.replace(/[^\d.]/g,'');}).call(this);if(this.value>{$user.pay_gold_TX}){this.value={$user.pay_gold_TX};}" onblur="this.v();" />
						</div>
						<p class="fs_m" style="padding: 0.5em;">金酒币提现规则：您的金酒币必须达到100个以上才能进行提现操作，一个月只能提现一次！</p>
						<div class="tx_ye_btn cls">
							<a class="ye_btn fs_xl" onclick="subtx('yetx')">确认转出</a>
						</div>
					</form>
				</div>
				<!--<div class="tx_mm">
					<form id="wxtx">
						<input type="hidden" name="bank_name" value="微信">
						<div class="tx_input mui-input-row fs_xl cls">
							<label class="fs_xl">金 额</label>
							<input type="text" placeholder="您当前可用金额￥{$user.user_money}" name="money" id="" />
						</div>
						<div class="tx_input mui-input-row fs_xl cls">
							<label class="fs_xl">账 号</label>
							<input type="text" placeholder="到账微信账号" name="account_bank" id="" />
						</div>
						<div class="tx_input mui-input-row fs_xl cls">
							<label class="fs_xl">姓 名</label>
							<input type="text" placeholder="收款人姓名" name="account_name" id="" />
						</div>
						<div class="tixian_btn" onclick="subtx('wxtx')"><a>确认提现</a></div>
				    </form>
				</div>
				<div class="tx_mm">
					<form id="yhtx">
						<div class="tx_input mui-input-row fs_xl cls">
							<label class="fs_xl">开户行</label>
							<input type="text" placeholder="开户银行" name="bank_name" id="" />
						</div>
						<div class="tx_input mui-input-row fs_xl cls">
							<label class="fs_xl">持卡人</label>
							<input type="text" placeholder="姓名" name="account_name" id="" />
						</div>
						<div class="tx_input mui-input-row fs_xl cls">
							<label class="fs_xl">卡&nbsp;&nbsp;&nbsp;号</label>
							<input type="text" placeholder="卡号" name="account_bank" id="" />
						</div>
						<div class="tx_input mui-input-row fs_xl cls">
							<label class="fs_xl">金&nbsp;&nbsp;&nbsp;额</label>
							<input type="text" placeholder="您当前可用金额￥{$user.user_money}" name="money" id="" />
						</div>
						<div class="tixian_btn" onclick="subtx('yhtx')"><a>确认提现</a></div>
					</form>
				</div>-->
			</div>
		</div>
		<script type="text/javascript">
			mui.init();
			$(function(){
				$(".tx_top li").click(function () {
        			$(".tx_top li").removeClass("active").eq($(".tx_top li").index(this)).addClass("active");
        			$(".tx_mm").hide().eq($('.tx_top li').index(this)).show();
    			});
				var inVal=$(".mui-input-clear").val();
				if(inVal==""){
					$(".ye_btn").addClass("active");
				}
				$("input").blur(function(){
					var inVal=$(".mui-input-clear").val();
					if(inVal==""){
						$(".ye_btn").addClass("active");
					}else{
						$(".ye_btn").removeClass("active");
					}
				})
			})
			
			function subtx(id){
                $.post("{:U('Mobile/User/gold_cash')}",$('#'+id).serializeArray(),function(data){
                	if(data.status == 1){
                		layer.alert(data.msg,1);
                		location.href=data.data.url;
                	}
                	else{
                		layer.alert(data.msg,2);
                	}
                },'json');
                $(".tx_input input").val("");
			}
		</script>
	</body>

</html>